<?php
$this->breadcrumbs=array(
	'Lịch sử check imei',
);
?>

<script>
$(document).ready(function(){
	$('#search').keyup(function(){
		var data = $(this).val();
		$.ajax({
            url: 'SuggestPerson',
            type: 'POST',
            dataType: 'JSON',
            data: {term: data},
            success: function(result){
            $('#table tr').each(function() {
				$(this).hide();
				if($(this).index()==0)
				{
					$(this).show();
				}
				for(var i=0;i<result.length;i++)
			    if($(this).find(".username").html() == result[i].username)
			    {
					$(this).show();
				}  
	 		});
            }
    		});
		});
});

</script>

<div class='m-paging' style="margin-bottom:20px;"> <?php $this->widget('MyPage', array('pages' => $pages,)) ;?></div>
<br>
<div class='full-screen'>
	<h1>Lịch sử check imei</h1>
	<div class="row">
<input type=text id=search />
</div><br/>
		<div class='main-content'>
			<table id=table width='100%'>
				<tr class='header-table'>
					<th class=header width='10%'>IMEI</th>
					<th width='20%'>User</th>
					<th width='20%'>Ngày check</th>
					<th width='50%'>Kết quả</th>
				</tr>
			<?php
			foreach ($checkimeis as $value){
				echo "<tr class='row-table'>";
				echo "<td>".$value->imei. "</td>";
				echo "<td class='username'>". $value->tbuser->username. "</td>";
				echo "<td>". $value->ngaycheck. "</td>";
				echo "<td>". $value->ketqua. "</td>";
				echo "</tr>";
			}
			?>
			</table>
		</div>
</div>